Theory of Computation


Q201.

Which of the following regular expressions describes the language over\{0, 1\} consisting of strings that contain exactly two 1's?
GateOverflow

Q202.

Consider the Deterministic Finite-state Automaton (DFA) A shown below. The DFA runs on the alphabet {0, 1}, and has the set of states {s, p, q, r}, with s being the start state and p being the only final state.Which one of the following regular expressions correctly describes the language accepted by A?
GateOverflow

Q203.

Which one of the following regular expressions represents the set of all binary strings with an odd number of 1's?
GateOverflow

Q204.

Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?
GateOverflow

Q205.

Consider the regular expression R = (a + b)^* (aa + bb) (a + b)^* Which of the following non-deterministic finite automata recognizes the language defined by the regular expression R? Edges labeled \lambda denote transitions on the empty string.
GateOverflow

Q206.

The length of the shortest string NOT in the language (over \Sigma={a,b}) of the following regular expression is _________. a*b* (ba)* a*
GateOverflow

Q207.

In some programming language, an identifier is permitted to be a letter followed by any number of letters or digits. If L and D denote the sets of letters and digits respectively, which of the following expressions defines an identifier?
GateOverflow

Q208.

Which one of the following languages over the alphabet {0,1} is described by the regular expression: (0+1)*0(0+1)*0(0+1)*?
GateOverflow

Q209.

The regular expression 0*(10*)* denotes the same set as
GateOverflow

Q210.

Let L=\left\{w \in(0+1)^{*} \mid w \text { has even number of } 1 \text { 's }\right\}, i.e. L is the set of all bit strings with even number of 1's. Which one of the regular expression below represents L?
GateOverflow